Skip to content

fix: allow organizers to hard-delete soft-deleted submissions#2422

Merged
Didayolo merged 1 commit into
codalab:delete-submissionsfrom
dconstancy:fix/quota-exclude-cancelled-submissions
Jun 25, 2026
Merged

fix: allow organizers to hard-delete soft-deleted submissions#2422
Didayolo merged 1 commit into
codalab:delete-submissionsfrom
dconstancy:fix/quota-exclude-cancelled-submissions

Conversation

@dconstancy

@dconstancy dconstancy commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Following feedback on the original approach (excluding Cancelled from quota),
this PR takes the suggested route: let organizers hard-delete soft-deleted
submissions so they can free up quota manually.

Issues this PR resolves

Changes

  • Frontend (submission_manager.tag): Add a delete button (trash icon)
    on soft-deleted submissions, visible to organizers only.
  • Backend (models.py): Guard self.data access in delete() and
    soft_delete() — after a soft-delete, self.data is None, which caused
    an AttributeError when trying to hard-delete.

A checklist for hand testing

  • As an organizer, soft-delete a submission, then confirm the trash icon appears
  • Click the trash icon and confirm the submission is permanently deleted
  • Verify quota is freed after hard-delete
  • Confirm non-organizers do not see the delete button on soft-deleted submissions

Checklist

  • Code review by me
  • Hand tested by me

Add a delete button visible to organizers on soft-deleted submissions,
and guard against None data in delete/soft_delete methods.
@dconstancy dconstancy force-pushed the fix/quota-exclude-cancelled-submissions branch from d16ddf8 to 600c3c5 Compare June 17, 2026 10:29
@dconstancy dconstancy changed the title fix: exclude cancelled submissions from quota count fix: allow organizers to hard-delete soft-deleted submissions Jun 17, 2026
@Didayolo Didayolo self-requested a review June 18, 2026 08:43
@Didayolo Didayolo self-assigned this Jun 18, 2026
@Didayolo Didayolo changed the base branch from develop to delete-submissions June 25, 2026 11:31
@Didayolo Didayolo merged commit 445079e into codalab:delete-submissions Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants